Trouble free BBS upgrade? No problem!
By Richard Bennett
Copyright (c) 1992 Apple Users' Group, Sydney
Republished from Applecations, a publication of the Apple Users' Group, Sydney, Australia.


With the purchase of new modems for the two club bulletin boards, came a number of problems, specifically for the Apple II BBS. This article describes some of the problems Cameron and I encountered in the process of yet again making the Apple II do the seemingly impossible.
In the January issue of Applecations, Grant Kwai gave us a description of the latest in data compression and error correction. The Avtek v.32 modem sold by the club supports MNP2, MNP4 and MNP5, and is also the modem used on both of the club bulletin boards. So it seemed logical that the Apple II BBS should at least support some type of MNP for those who had bought them. Instead, the BBS now supports all the protocols and speeds which the modem supports. And they said it couldn't be done!
To support MNP4 and MNP5 protocols (error correction and data compression respectively), the modem requires flow control between it and the computer. This means that the BBS sends all data to the modem at high speed, and the modem sends this to the user at the speed they are connected at. There is RAM inside the modem, which allows it to buffer data from the computer while the computer does something else. eg. updating the user's logon record
Of course the other benefit is that by using MNP5, your terminal program has the ability to run at an effective data rate approaching 19200bps, which on an Apple II is almost equivalent to the speed of the standard 80 column text screen!
Although there are a number of methods for obtaining flow control, the most reliable is by using hardware. Hardware flow control is where the modem uses a pin on the cable to signal when it is ready to receive data from the computer (called CTS, or Clear To Send). If the modem fills its buffer, probably because the user is logged on at a slow speed, it signals to the computer to stop sending. Once the buffer is close to empty, it signals the computer again to continue on.
We originally tried using the Super Serial Card in the machine to drive the modem using flow control, however this caused a number of other problems which I won't go into. The decision was made to write a special driver that would use the IIgs modem port.
For the cable, we used the pin-out described in the Eclipse BBS manual*, which I had previously designed for the Eclipse package. This provided all the necessary pin connections for hardware flow control and hardware hangup of the modem, which is necessary to run a reliable BBS.
Chris Nelligan had already written a IIgs driver for the BBS, but it wouldn't handle flow control, and it had a number of implementation problems, so we once again turned to Eclipse, and used the IIgs modem port driver I had written. This is where the problems really started, as the
code size was over 780 bytes. When Chris and I designed ProBOARD //, the software which runs the club BBS, we only left 208 bytes. This was a legacy from the days when ProBOARD ran under DOS 3.3, and we never thought of changing it. Not only were we short by over 570 bytes, but due to the ProBOARD driver specifications, we needed to add some extra code which was not necessary for the Eclipse version.
What followed, was a massive optimisation of the code by myself, a number of changes in the way the BBS code worked by Cameron, and a number of rather difficult to find bugs. In the end, the code was shortened to exactly 205 bytes. This was combined with the fact that Cameron was due to leave for New Zealand a few days later, so we were pretty pushed for time. We finished everything off at around midnight the night before he was due to leave, with the BBS down for only half an hour, and that included testing the BBS with every speed and protocol option imaginable. It worked great, now if only it would stay up until Cameron got back! It did.
I think you'll find the new BBS a lot more reliable, and for those with recent generation modems (including the Avtek range sold by the club and used on the BBS), a hell of a lot faster!
* Eclipse is a new bulletin board package written by Andrew Roughan and Richard Bennett. It is currently in beta test, and should be available RSN. "Real soon now..."

THIS CONTENT COPYRIGHT © 2007, APPLE MACINTOSH USERS' GROUP, SYDNEY
Permission has been obtained to make this material available on the Internet.

Permission is hereby granted for non-profit user groups to republish this content.
PLEASE CREDIT THE AUTHOR AND THE SOURCE: Applecations, publication of the Apple Users' Group, Sydney, Australia

THIS PAGE COPYRIGHT © 2007, ANDREW ROUGHAN